import NormalStuff from './normal.class'

class AgedBrieStuff extends NormalStuff {
  constructor(sellIn: number, quality: number) {
      super(sellIn, quality);
  }

  updateQuality(): number {
    const isExpired = this.isExpiration(this.sellIn);
    return this.quality = this.cleanQuality(
      this.quality +
        (isExpired ? this.OFFSET_QUALITY_TWO : this.OFFSET_QUALITY_ONE)
    );
  }
}

export default AgedBrieStuff;
